package com.lvmama.rhino.utils;

import java.util.concurrent.TimeUnit;

public class Constants {
    /**
     * 属性文件加载对象
     */
    private static PropertiesLoader loader = new PropertiesLoader("elasticsearch.properties");

    private static PropertiesLoader ftpLoader = new PropertiesLoader("ftp.properties");

    public static final String H5Page_INDEX_NAME = "rhino";
    public static final String H5Page_TYPE_NAME_ALL = "h5_page_monitor";
    public static final String H5Page_TYPE_NAME_Period_1 = "h5_page_monitor_1";
    public static final String H5Page_TYPE_NAME_Period_2 = "h5_page_monitor_2";
    public static final String H5Page_TYPE_NAME_Period_3 = "h5_page_monitor_3";
    public static final String H5Page_TYPE_NAME_Period_4 = "h5_page_monitor_4";
    public static final String H5Page_TYPE_NAME_Period_5 = "h5_page_monitor_5";
    public static final String RHINO_CREDENTIALS = "6bf968f0c7b39ddbb7c8aa836b74d092060ed9b85b620a7fb088ecc48c6b3efd696bbd820f74c14f66c80c86c557c4bfda51b8a3743d3d568cc5c08410b7bb6a";
    public static final String PASSWORD = "lvadmin";
    //生产环境
    public static final String EVN_PRD= "prd";
    //测试环境
    public static final String EVN_TEST= "test";

    /**
     * 获取配置
     *
     * @param key
     * @return
     */
    public static String getConfig(String key) {
        return loader.getProperty(key);
    }

    public static String getFtpConfig(String key) {
        return ftpLoader.getProperty(key);
    }

    /*评价*/
    public static final String UNKNOWN = "未知";
    public static final String UNKNOWNDATA = "0";
    public static final String UNKNOWNDATA2 = "\\N";
    public static final String UNKNOWNDATA3 = "null";

    // redis key有效时间
    public static final int TIMEOUT = 12 * 60 * 60;
    // 评价系统redis key前缀
    public static final String KEY_PREFIX = "rhino_comment_";
    // 预测页面-默认显示7条数据
    public static final int PRE_NUM = 7;
    public static final String ASC = "ASC"; // 升序
    public static final String DESC = "DESC"; // 降序
    /*评价*/

}
    